package com.css.dzj.dzjdzqs.modules.apinfo.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.google.common.base.Objects;

import javax.persistence.*;
import java.util.Date;


/**
 * 执法监管人员信息
 * @Author WT
 * @Date 2020/6/29
 */
@Entity
@Table(name = "JG_ZFK_USER_INFO", schema = "DZJJH", catalog = "")
public class ApInfoEntity {
    //主键
    private String id;
    //记录唯一标识
    private String recordUniqueIdentity;
    //姓名
    private String name;
    //所属主体（受委托组织）全称
    private String fullNameOfTheSubject;
    //身份证号
    private String idNumber;
    //性别
    private String sex;
    //出生日期
    private Date birthDate;
    //政治面貌
    private String politicalStatus;
    //职级
    private String rank;
    //民族
    private String nation;
    //最高学历
    private String highestEducation;
    //执法人员性质
    private String lawStaffType;
    //是否监督人员
    private String supervisionStaff;
    //是否具有法律职业资格
    private String qualificationLegalPro;
    //联系电话
    private String contactTel;
    //执法证号
    private String code;
    //学历专业
    private String academicQualifications;
    //发证机关
    private String licenceIssuingAuthority;
    //执法区域
    private String enforcementArea;
    //执法类别
    private String enforcementType;
    //证件有效期
    private Date validityDocuments;

    @Id
    @Column(name = "ID")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "Record_Unique_Identity")
    public String getRecordUniqueIdentity() {
        return recordUniqueIdentity;
    }

    public void setRecordUniqueIdentity(String recordUniqueIdentity) {
        this.recordUniqueIdentity = recordUniqueIdentity;
    }

    @Basic
    @Column(name = "Name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "Full_name_of_the_subject")
    public String getFullNameOfTheSubject() {
        return fullNameOfTheSubject;
    }

    public void setFullNameOfTheSubject(String fullNameOfTheSubject) {
        this.fullNameOfTheSubject = fullNameOfTheSubject;
    }

    @Basic
    @Column(name = "ID_Number")
    public String getIdNumber() {
        return idNumber;
    }

    public void setIdNumber(String idNumber) {
        this.idNumber = idNumber;
    }

    @Basic
    @Column(name = "Sex")
    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    @Basic
    @Column(name = "Birth_Date")
    @JsonFormat(shape= JsonFormat.Shape.STRING,pattern="yyyy-MM-dd",timezone="GMT+8")
    public Date getBirthDate() {
        return birthDate;
    }

    public void setBirthDate(Date birthDate) {
        this.birthDate = birthDate;
    }

    @Basic
    @Column(name = "Political_Status")
    public String getPoliticalStatus() {
        return politicalStatus;
    }

    public void setPoliticalStatus(String politicalStatus) {
        this.politicalStatus = politicalStatus;
    }

    @Basic
    @Column(name = "Rank")
    public String getRank() {
        return rank;
    }

    public void setRank(String rank) {
        this.rank = rank;
    }

    @Basic
    @Column(name = "Nation")
    public String getNation() {
        return nation;
    }

    public void setNation(String nation) {
        this.nation = nation;
    }

    @Basic
    @Column(name = "Highest_Education")
    public String getHighestEducation() {
        return highestEducation;
    }

    public void setHighestEducation(String highestEducation) {
        this.highestEducation = highestEducation;
    }

    @Basic
    @Column(name = "Law_Staff_Type")
    public String getLawStaffType() {
        return lawStaffType;
    }

    public void setLawStaffType(String lawStaffType) {
        this.lawStaffType = lawStaffType;
    }

    @Basic
    @Column(name = "Supervision_Staff")
    public String getSupervisionStaff() {
        return supervisionStaff;
    }

    public void setSupervisionStaff(String supervisionStaff) {
        this.supervisionStaff = supervisionStaff;
    }

    @Basic
    @Column(name = "Qualification_Legal_Pro")
    public String getQualificationLegalPro() {
        return qualificationLegalPro;
    }

    public void setQualificationLegalPro(String qualificationLegalPro) {
        this.qualificationLegalPro = qualificationLegalPro;
    }

    @Basic
    @Column(name = "Contact_Tel")
    public String getContactTel() {
        return contactTel;
    }

    public void setContactTel(String contactTel) {
        this.contactTel = contactTel;
    }

    @Basic
    @Column(name = "Code")
    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    @Basic
    @Column(name = "Academic_Qualifications")
    public String getAcademicQualifications() {
        return academicQualifications;
    }

    public void setAcademicQualifications(String academicQualifications) {
        this.academicQualifications = academicQualifications;
    }

    @Basic
    @Column(name = "Licence_Issuing_Authority")
    public String getLicenceIssuingAuthority() {
        return licenceIssuingAuthority;
    }

    public void setLicenceIssuingAuthority(String licenceIssuingAuthority) {
        this.licenceIssuingAuthority = licenceIssuingAuthority;
    }

    @Basic
    @Column(name = "Enforcement_Area")
    public String getEnforcementArea() {
        return enforcementArea;
    }

    public void setEnforcementArea(String enforcementArea) {
        this.enforcementArea = enforcementArea;
    }

    @Basic
    @Column(name = "Enforcement_Type")
    public String getEnforcementType() {
        return enforcementType;
    }

    public void setEnforcementType(String enforcementType) {
        this.enforcementType = enforcementType;
    }

    @Basic
    @Column(name = "Validity_Documents")
    @JsonFormat(shape= JsonFormat.Shape.STRING,pattern="yyyy-MM-dd",timezone="GMT+8")
    public Date getValidityDocuments() {
        return validityDocuments;
    }

    public void setValidityDocuments(Date validityDocuments) {
        this.validityDocuments = validityDocuments;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ApInfoEntity that = (ApInfoEntity) o;
        return Objects.equal(id, that.id) &&
                Objects.equal(recordUniqueIdentity, that.recordUniqueIdentity) &&
                Objects.equal(name, that.name) &&
                Objects.equal(fullNameOfTheSubject, that.fullNameOfTheSubject) &&
                Objects.equal(idNumber, that.idNumber) &&
                Objects.equal(sex, that.sex) &&
                Objects.equal(birthDate, that.birthDate) &&
                Objects.equal(politicalStatus, that.politicalStatus) &&
                Objects.equal(rank, that.rank) &&
                Objects.equal(nation, that.nation) &&
                Objects.equal(highestEducation, that.highestEducation) &&
                Objects.equal(lawStaffType, that.lawStaffType) &&
                Objects.equal(supervisionStaff, that.supervisionStaff) &&
                Objects.equal(qualificationLegalPro, that.qualificationLegalPro) &&
                Objects.equal(contactTel, that.contactTel) &&
                Objects.equal(code, that.code) &&
                Objects.equal(academicQualifications, that.academicQualifications) &&
                Objects.equal(licenceIssuingAuthority, that.licenceIssuingAuthority) &&
                Objects.equal(enforcementArea, that.enforcementArea) &&
                Objects.equal(enforcementType, that.enforcementType) &&
                Objects.equal(validityDocuments, that.validityDocuments);
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(id, recordUniqueIdentity, name, fullNameOfTheSubject, idNumber, sex, birthDate, politicalStatus, rank, nation, highestEducation, lawStaffType, supervisionStaff, qualificationLegalPro, contactTel, code, academicQualifications, licenceIssuingAuthority, enforcementArea, enforcementType, validityDocuments);
    }
}
